﻿@{
ViewBag.Title = "单日报销申请";
Layout = "~/Views/Shared/_Layout.cshtml";
}
@section mystyle{
}

<div class="container" id="viewDetail">
  <!--<div class="row">
    <div class="col-sm-12 text-center">
      <h1>某品牌-类型-某日-执行</h1>
      <h3 id="time">时间：2016年3月17日</h3>
    </div>
  </div>
  <div>
    <form class="form-horizontal">
      <div class="form-group line-height-34">
        <div class="col-sm-2 col-sm-offset-2">城市间交通费用</div>
        <div class="col-sm-2 text-right" id="">总计：***元</div>
        <div class="col-sm-2">费用说明</div>
        <div class="col-sm-2 text-right" id="">***</div>
      </div>

      <div class="form-group line-height-34">
        <div class="col-sm-2 col-sm-offset-2">市内交通费用</div>
        <div class="col-sm-2 text-right" id="">总计：***元</div>
        <div class="col-sm-2">费用说明</div>
        <div class="col-sm-2 text-right" id="">***</div>
      </div>

      <div class="form-group line-height-34">
        <div class="col-sm-2 col-sm-offset-2">住宿费用</div>
        <div class="col-sm-2 text-right" id="">总计：***元</div>
        <div class="col-sm-2">费用说明</div>
        <div class="col-sm-2 text-right" id="">***</div>
      </div>

      <div class="form-group">
        <ul class="step-list">
          <li class="row">
            <div class="col-sm-6 line-height-34">提交申请</div>
            <div class="col-sm-6 line-height-34">2016年3月26日</div>
          </li>
          <li class="row">
            <div class="col-sm-6 line-height-34">项目运营已确认发票</div>
            <div class="col-sm-6 line-height-34">2016年3月26日</div>
          </li>
          <li class="row">
            <div class="col-sm-6 line-height-34">项目经理已确认发票</div>
            <div class="col-sm-6 line-height-34">2016年3月26日</div>
          </li>

        </ul>
        <div class="col-sm-12 text-center line-height-34" id>已完成</div>
        <div class="col-sm-6 text-right line-height-34" id="">原因：发票抬头不对</div>
      </div>

      <div class="form-group">
        <div class="col-sm-6 col-sm-offset-6">
          <button type="button" class="btn btn-danger none" id="cancel">取消申请</button>
          <button type="button" class="btn btn-danger none" id="resubmit">重新申请</button>
        </div>
      </div>
    </form>
  </div>-->
</div>


<script id="detail" type="text/html">
  <div class="row">
    <div class="col-sm-12 text-center" id="projectInfo">
      <h1>某品牌-类型-某日-执行</h1>
      <h3>时间：2016年3月17日</h3>
    </div>
  </div>
  <form class="form-horizontal">
    <div class="form-group">
      <label for="" class="col-sm-3 col-sm-offset-2 control-label">报销日期</label>
      <div class="col-sm-3 line-height-34">{{data[0].SubmitTime}}</div>
    </div>

    <div class="form-group">
      <label for="" class="col-sm-3 col-sm-offset-2 control-label">报销人</label>
      <div class="col-sm-3 line-height-34">{{data[0].UserName}}</div>
    </div>

    {{each data as value i}}
    <div class="form-group">
      <label for="" class="col-sm-3 control-label">{{value.CostType}}</label>
      <div class="col-sm-3 line-height-34">总计：{{value.CostMoney}}元</div>
      <div class="col-sm-3 line-height-34">费用说明</div>
      <div class="col-sm-3 line-height-34">{{value.CostExplain}}</div>
    </div>
    {{/each}}

    <div class="form-group">
      <div class="col-sm-3 col-sm-offset-3">
        <img src="{{data[0].InvoiceURL}}" alt="" class="max-width-100">
        <p><a href="{{data[0].InvoiceURL}}">下载图片</a></p>
      </div>
    </div>

    <div class="form-group">
      <ul class="step-list">
        {{each data2 as value i}}
        <li class="row">
          <div class="col-sm-6">{{value.TriggerMan + value.IncidentContent}}</div>
          <div class="col-sm-6">{{value.CreateTime}}</div>
        </li>
        {{/each}}
        <!--<li class="row">
          <div class="col-sm-6">提交申请</div>
          <div class="col-sm-6">{{data[0].ApplyDate}}</div>
        </li>
        {{if data[0].RunAuditTime}}
        <li class="row">
          <div class="col-sm-6">项目运营审核</div>
          <div class="col-sm-6">{{data[0].RunAuditTime}}</div>
        </li>
        {{/if}}
        {{if data[0].PMAuditTime}}
        <li class="row">
          <div class="col-sm-6">项目经理审核</div>
          <div class="col-sm-6">{{data[0].PMAuditTime}}</div>
        </li>
        {{/if}}-->
      </ul>
    </div>
    <!--{{if data[0].State !== '提交申请'}}
    <div class="form-group">
      <div class="col-sm-2 col-sm-offset-5 text-center">{{data[0].State}}</div>
    </div>
    {{/if}}-->

    {{each data2 as value i}}
    {{if value && value.IncidentContent.indexOf('驳回') !== -1 }}
    <div class="form-group">
      <div class="col-sm-2 col-sm-offset-5">
        {{value.Explain}}
      </div>
    </div>
    {{/if}}
    {{/each}}

    {{if teacher && !run && !reject}}
    <div class="form-group">
      <div class="col-sm-2 col-sm-offset-5">
        <button type="button" id="cancel" class="btn btn-success btn-block">取消申请</button>
      </div>
    </div>
    {{/if}}

    {{if reject}}
    <div class="form-group">
      <div class="col-sm-2 col-sm-offset-5">
        <button type="button" id="submit" class="btn btn-success btn-block">重新申请</button>
      </div>
    </div>
    {{/if}}
  </form>
</script>

<div class="modal fade" id="alert" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content padding-10 text-center">
      <h1>重新申请成功！</h1>
      <button type="button" class="btn btn-success margin-top-20" id="return">确定</button>
    </div>
  </div>
</div>

@section myscript{
<script src="~/Content/vendor/vue/vue.min.js"></script>
<script src="~/Content/js/bind42.js"></script>
}